package com.bwda.dsrs.systemservice.service;

import com.bwda.dsrs.systemservice.domain.form.menu.MenuTree;
import com.bwda.dsrs.systemservice.domain.form.menu.MenuTreeForm;
import com.bwda.dsrs.systemservice.domain.form.org.OrgTreeForm;
import com.bwda.dsrs.systemservice.domain.po.menu.MenuPo;
import com.bwda.dsrs.systemservice.domain.condition.menu.MenuCondition;

import java.util.List;

/**
 * @author yangjun
 */
public interface MenuService extends BaseService<MenuPo, MenuCondition> {

    /**
     * 查询统计排序相邻的菜单
     * @param condition
     * @return
     */
    public MenuPo queryNearMenu(MenuCondition condition);

    /**
     * 交换排序
     * @param mecondition
     * menuCurrent
     * menuNext
     * @param mecondition
     * @return
     */
    public int exchangeSortNum(MenuCondition mecondition);

    /**
     * 查询菜单树
     * @param menuCondition
     * @return
     */
    List<MenuTreeForm> queryTreeList(MenuCondition menuCondition);

    /**
     * 转换菜单树
     * @param poList
     * @return
     */
    List<MenuTreeForm> queryTree(List<MenuTreeForm> poList);

    /**
     * 转换菜单树
     * @param poList
     * @return
     */
    List<MenuTree> queryMenuTree(List<MenuTreeForm> poList);
    /**
     * 按级转换菜单树
     * @param poList
     * @return
     */
    List<MenuTree> queryMenuTreeSingle(List<MenuTreeForm> poList);

    /**
     * 查询重名
     * @param condition
     * @return
     */
    int   countByName(MenuCondition condition);

}